package com.pactera.madp.cp.api.entity.product;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.pactera.madp.cp.api.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 产品分类表
 *
 * @author kedongZhang
 * @date 2021/5/25 20:57
 */
@Data
@ApiModel(value = "产品分类实体")
@TableName("cp_prod_group")
public class ProductGroupEntity extends BaseEntity<ProductGroupEntity> {
    private static final long serialVersionUID = 1L;

    /**
     * 产品分类id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "分类id")
    private Integer id;

    /**
     * 企业id
     */
    @NotNull(message = "企业id不能为空")
    @ApiModelProperty(value = "企业id")
    private Integer corpId;

    /**
     * 分类名称
     */
    @NotBlank(message = "分类名称不能为空")
    @ApiModelProperty(value = "分类名称")
    private String name;

    /**
     * 可见范围类型,1-全部部门,2-部门可见
     */
    @NotNull(message = "可见范围不能为空")
    @ApiModelProperty(value = "可见范围类型,1-全部部门,2-部门可见")
    private Integer visibleRange;

}
